Skip to content

Conversation

miguelgrinberg
Copy link
Contributor

No description provided.

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM.

Comment on lines 1146 to 1153
f"ON {', '.join([self._format_id(field) for field in self._fields])} "
f"WITH {json.dumps(with_)}"
)
else:
return (
f"RERANK {json.dumps(self._query[0])} "
f"ON {', '.join([self._format_id(field) for field in self._fields])} "
f"WITH {json.dumps(with_)}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the code duplication makes me slightly nervous, given this code is not generated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it best to keep the templates for each version of the command separate so that you can see what the command looks like more easily, but sure, it does add some repetition. I'll see if I can come up with a better way to structure this and other similar commands.

@miguelgrinberg miguelgrinberg merged commit a57e556 into elastic:main Sep 2, 2025
15 checks passed
@miguelgrinberg miguelgrinberg deleted the add-rerank-esql-command branch September 2, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants